import request from '../util/request'

const baseUrl = process.env.NODE_ENV === 'production' ? '' : '/vehicleMap'

export function loadPartnerApi(params) {
  return request({
    url:baseUrl+ "/lcpartner",
    method: "get",
    params:params
  })
}
export function addPartnerApi(form) {
  return request({
    url:baseUrl+ "/lcpartner",
    method: "post",
    data: form
  });
}
export function updatePartnerApi(form) {
  return request({
    url:baseUrl+ "/lcpartner",
    method: "put",
    data: form
  })
}
export function delPartnerApi(row) {
  return request({
    url:baseUrl+ "/lcpartner/selective",
    method: "delete",
    data: {
      id: row.id
    }
  })
}
export function batchDelPartnerApi(multipleSelection) {
  let ids = new Array();
  for (let i = 0; i < multipleSelection.length; i++) {
    ids[i] = multipleSelection[i].id
  }
  return request({
    url:baseUrl+ '/lcpartner',
    method: 'delete',
    data: ids
  });
}
export function loadPartnerByManagerApi(managerId) {
  return request({
    url:baseUrl+ "/lcpartner",
    method: "get",
    params: {
      managerId: managerId,
    }
  })
}
